<template>
  <div class="houseIntroduce">
    <div class="housename">{{ houseName }}</div>
    <div class="tags">
      <template v-for="(item, index) in houseTags" :key="item">
        <span class="textStyle">
          {{ item.tagText?.text }}
        </span>
      </template>
    </div>
    <div class="score">
      <div class="left">
        <span class="one">{{ houseScore.overall }}</span>
        <span class="two">{{ houseScore?.scoreTitle }}</span>
        <span class="three">{{ houseScore?.commentBrief }}</span>
      </div>
      <div class="right">
        {{ houseScore?.totalCount }}条评论
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="localtion">
      <div class="left">
        <span class="one">
          {{ houseLocaltion.address }}
        </span>
      </div>
      <div class="right">地图·周边 <van-icon name="arrow" /></div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  houseName: {
    type: String,
  },
  houseTags: {
    type: Array,
  },
  houseScore: {
    type: Object,
  },
  houseLocaltion: {
    type: Object,
  },
})
</script>

<style lang="less" scoped>
.houseIntroduce {
  margin-top: 5px;
  padding: 8px;

  .housename {
    font-size: 17px;
    font-weight: 700;
  }
  .tags {
    margin-top: 8px;
    display: flex;
    align-items: center;
    .textStyle {
      padding: 1.7px;
      margin: 1px;
      font-size: 0.1px;
      border: 0px solid #fff;
      border-radius: 6px;
      background-color: rgb(242, 223, 187);
      color: var(--primary-color);
      text-shadow: 0.4px 0.3px var(--primary-color);
      &:first-child {
        background-color: #333;
      }
      &:last-child {
        background-color: rgb(208, 236, 227);
        color: rgb(110, 211, 211);
        text-shadow: 0.3px 0.3px rgb(110, 211, 211);
      }
    }
  }
  .score,
  .localtion {
    margin-top: 9px;
    display: flex;
    justify-content: space-between;
    background-color: #f8f7f7;
    border: 1px solid #f8f7f7;
    border-radius: 5px;
    padding: 4px;
    .left,
    .right {
      display: flex;
      align-items: center;
      .one {
        margin-right: 4px;
        font-size: 12px;
        font-weight: 700;
      }
      .two {
        margin-right: 4px;
        font-size: 6px;
        text-shadow: 0.4px 0.3px #333;
      }
      .three {
        font-size: 3px;
        color: #bbb;
      }
    }
    .right {
      font-size: 12px;
      text-shadow: 0.4px 0.3px var(--primary-color);
      color: var(--primary-color);
    }
  }
}
</style>
